package com.zhangck.bos2_0.action.transit;

import java.util.HashMap;
import java.util.Map;

import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Actions;
import org.apache.struts2.convention.annotation.Namespace;
import org.apache.struts2.convention.annotation.ParentPackage;
import org.apache.struts2.convention.annotation.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import com.opensymphony.xwork2.ActionContext;
import com.zhangck.bos2_0.Service.transit.DeliveryInfoService;
import com.zhangck.bos2_0.common.BaseAction;

import cn.itcast.bos.domain.transit.DeliveryInfo;

/** 
* @author 上午茶
* @version 创建时间：2018年6月20日 上午9:10:38 
* 类说明 
 * @param <DeliveryInfoService>
*/
@ParentPackage("json-default")
@Namespace("/")
@Scope("prototype")
@Actions
@Controller
public class deliveryInfoAction extends BaseAction<DeliveryInfo> {

	@Autowired
	private DeliveryInfoService deliveryInfoService;
	
	private String deliveryId; 

	public void setDeliveryId(String deliveryId) {
		this.deliveryId = deliveryId;
	}

	@Action(value = "deliver_save", results = { @Result(name = "success", type="redirect", location="./pages/transit/transitinfo.html") })
	public String deliver_save() {
		System.out.println(deliveryId);
		deliveryInfoService.save(deliveryId,model);
		return "success";
	}
}
